package com.zwd.cases.demo.gof23.decorator;

/**
 * @Description 定义具体装饰器类RedBorderDecorator，继承自ShapeDecorator，表示添加红色边框的装饰器
 * @Author zhengwd
 * @Date 2023/4/11 9:53
 **/
public class RedBorderDecorator extends ShapeDecorator {
    public RedBorderDecorator(Shape decoratedShape) {
        super(decoratedShape);
    }

    public void draw() {
        decoratedShape.draw();
        setRedBorder(decoratedShape);
    }

    private void setRedBorder(Shape decoratedShape) {
        System.out.println("Border Color: Red");
    }
}

